"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function run() {
    return 'run';
}
var run2 = function () {
    return 123;
};
function getInfo(name, age) {
    if (age)
        return name + " --- " + age;
    else
        return "" + name;
}
console.log(getInfo('zhangsan'));
function getInfo2(name, age) {
    if (age === void 0) { age = 20; }
    return name + " --- " + age;
}
console.log(getInfo2('张三'));
console.log(getInfo2('张三', 30));
function getInfo3(str) {
    if (typeof str === 'string') {
        return '我叫：' + str;
    }
    else {
        return '我的年龄是' + str;
    }
}
function sum() {
    var result = [];
    for (var _i = 0; _i < arguments.length; _i++) {
        result[_i] = arguments[_i];
    }
    var sum = 0;
    for (var i = 0; i < result.length; i++) {
        sum = sum + result[i];
    }
    return sum;
}
